package day15.ZiXi;

import java.util.concurrent.*;

public class ThreadPoolExecutorDemo01 {
    public static void main(String[] args) {
        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(1, 3, 20, TimeUnit.SECONDS, new ArrayBlockingQueue<>(1), Executors.defaultThreadFactory(), new ThreadPoolExecutor.AbortPolicy());
        for (int x = 0; x <5 ; x++) {
            threadPoolExecutor.submit(()->{
                System.out.println(Thread.currentThread().getName()+"--->zx");
            });
            
        }
    }
}
